package com.spring.dao;

import com.spring.model.User;
import org.springframework.stereotype.Repository;
/**
 * Created by hbl on 2017/12/27.
 */

@Repository("UserDao")
public class UserDao extends BaseDao<User> implements IUserDao {
    @Override
    public long getGroupUserCount(int gid) {
        String hql = "select count(*) from User where group.id=?";
        long count = (Long) this.getSession().createQuery(hql)
                .setParameter(0, gid).uniqueResult();
        return count;
    }
}
